package com.joplus.housekeeper.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by ccm on 2016/12/27 21:14
 */

public class RedPacketBean implements Parcelable {


    /**
     * code : 2000
     * data : {"hasExchange":"1","appPic":"http://image.joplus.cn/2017-01-23/2017012309583018301795.png?e=1496997133&token=aBcc3cHlCNiHpGi-QCjGrwLt_P8iLyvWiVlFN1Vp:OCHBlG14VmiwpkN2p1yj9NeE8fA=","couponName":"新年红包雨活动","backgroundPic":"http://image.joplus.cn/2017-01-23/2017012309584415705171.png?e=1496997133&token=aBcc3cHlCNiHpGi-QCjGrwLt_P8iLyvWiVlFN1Vp:KuADcof4fvLsRfK64F8hzsscOBU=","rule":"1.获得的优惠券请在有效时间使用@@2. 如果在使用时有问题请联系管家@@3. 管家拥有最终解释权","totalPrice":1000,"couponList":[{"id":9433,"couponId":"coup1485137075588pvSS","couponNo":"COUP1485137075588yFrq","couponCode":"c34o","couponName":"剑道体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人限用一张","limitCount":1,"serId":"ser1483068623501yVEK","provider":null,"serName":null,"parentId":"cparent1485137075587yAcU","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":200,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null},{"id":9633,"couponId":"coup1485137075712qbXr","couponNo":"COUP1485137075712SINg","couponCode":"c9ej","couponName":"潜水体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人限用一张","limitCount":1,"serId":"ser1483081183348DvHX","provider":null,"serName":null,"parentId":"cparent1485137075712Bzmz","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":400,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null},{"id":9833,"couponId":"coup1485137075776OigN","couponNo":"COUP148513707577670vb","couponCode":"ci1c","couponName":"太极体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人使用一张","limitCount":1,"serId":"ser1483070199424h2hP","provider":null,"serName":null,"parentId":"cparent1485137075776Q2KC","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":400,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null}]}
     * message : 查询成功
     */

    private String code;
    private DataBean data;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static class DataBean implements Parcelable {
        /**
         * hasExchange : 1
         * appPic : http://image.joplus.cn/2017-01-23/2017012309583018301795.png?e=1496997133&token=aBcc3cHlCNiHpGi-QCjGrwLt_P8iLyvWiVlFN1Vp:OCHBlG14VmiwpkN2p1yj9NeE8fA=
         * couponName : 新年红包雨活动
         * backgroundPic : http://image.joplus.cn/2017-01-23/2017012309584415705171.png?e=1496997133&token=aBcc3cHlCNiHpGi-QCjGrwLt_P8iLyvWiVlFN1Vp:KuADcof4fvLsRfK64F8hzsscOBU=
         * rule : 1.获得的优惠券请在有效时间使用@@2. 如果在使用时有问题请联系管家@@3. 管家拥有最终解释权
         * totalPrice : 1000
         * couponList : [{"id":9433,"couponId":"coup1485137075588pvSS","couponNo":"COUP1485137075588yFrq","couponCode":"c34o","couponName":"剑道体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人限用一张","limitCount":1,"serId":"ser1483068623501yVEK","provider":null,"serName":null,"parentId":"cparent1485137075587yAcU","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":200,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null},{"id":9633,"couponId":"coup1485137075712qbXr","couponNo":"COUP1485137075712SINg","couponCode":"c9ej","couponName":"潜水体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人限用一张","limitCount":1,"serId":"ser1483081183348DvHX","provider":null,"serName":null,"parentId":"cparent1485137075712Bzmz","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":400,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null},{"id":9833,"couponId":"coup1485137075776OigN","couponNo":"COUP148513707577670vb","couponCode":"ci1c","couponName":"太极体验券","expirDate":"2017-06-30 00:00","tagOne":"免费1人次","tagTwo":"单人使用一张","limitCount":1,"serId":"ser1483070199424h2hP","provider":null,"serName":null,"parentId":"cparent1485137075776Q2KC","couponShareId":null,"mobile":null,"couponSerId":null,"couponFestivalId":"festival1485136727119G1TO","couponList":null,"value":400,"exchangeExpirDate":null,"discount":null,"discountLimit":null,"discountTop":null,"area":"全国通用","newAccountId":null,"vcouponMoney":null,"memberId":null,"memberName":null,"availableDays":null,"vcouponStatus":null,"couponMoney":null,"couponStatus":"10012","isSent":"10014","isFailed":"10016","conditionMoney":null,"couponCategory":"free","userLimit":null,"accountId":"acc1466044931968Q8YB","createdTime":null,"isDele":null,"usedDate":null,"count":null,"exchangeTime":"2017-01-24 10:55","isExchange":null,"isUsed":null,"businessId":null,"businessCategory":null,"businessDetailUrl":null}]
         */

        private String hasExchange;
        private String appPic;
        private String couponName;
        private String backgroundPic;
        private String rule;
        private int totalPrice;
        private List<CouponListBean> couponList;

        public String getHasExchange() {
            return hasExchange;
        }

        public void setHasExchange(String hasExchange) {
            this.hasExchange = hasExchange;
        }

        public String getAppPic() {
            return appPic;
        }

        public void setAppPic(String appPic) {
            this.appPic = appPic;
        }

        public String getCouponName() {
            return couponName;
        }

        public void setCouponName(String couponName) {
            this.couponName = couponName;
        }

        public String getBackgroundPic() {
            return backgroundPic;
        }

        public void setBackgroundPic(String backgroundPic) {
            this.backgroundPic = backgroundPic;
        }

        public String getRule() {
            return rule;
        }

        public void setRule(String rule) {
            this.rule = rule;
        }

        public int getTotalPrice() {
            return totalPrice;
        }

        public void setTotalPrice(int totalPrice) {
            this.totalPrice = totalPrice;
        }

        public List<CouponListBean> getCouponList() {
            return couponList;
        }

        public void setCouponList(List<CouponListBean> couponList) {
            this.couponList = couponList;
        }

        public static class CouponListBean implements Parcelable {
            /**
             * id : 9433
             * couponId : coup1485137075588pvSS
             * couponNo : COUP1485137075588yFrq
             * couponCode : c34o
             * couponName : 剑道体验券
             * expirDate : 2017-06-30 00:00
             * tagOne : 免费1人次
             * tagTwo : 单人限用一张
             * limitCount : 1
             * serId : ser1483068623501yVEK
             * provider : null
             * serName : null
             * parentId : cparent1485137075587yAcU
             * couponShareId : null
             * mobile : null
             * couponSerId : null
             * couponFestivalId : festival1485136727119G1TO
             * couponList : null
             * value : 200
             * exchangeExpirDate : null
             * discount : null
             * discountLimit : null
             * discountTop : null
             * area : 全国通用
             * newAccountId : null
             * vcouponMoney : null
             * memberId : null
             * memberName : null
             * availableDays : null
             * vcouponStatus : null
             * couponMoney : null
             * couponStatus : 10012
             * isSent : 10014
             * isFailed : 10016
             * conditionMoney : null
             * couponCategory : free
             * userLimit : null
             * accountId : acc1466044931968Q8YB
             * createdTime : null
             * isDele : null
             * usedDate : null
             * count : null
             * exchangeTime : 2017-01-24 10:55
             * isExchange : null
             * isUsed : null
             * businessId : null
             * businessCategory : null
             * businessDetailUrl : null
             */
            private int id;
            private String couponId;
            private String couponNo;
            private String couponCode;
            private String couponName;
            private String expirDate;
            private String tagOne;
            private String tagTwo;
            private int limitCount;
            private String serId;
            private int couponMoney;
            private String couponStatus;

            private int conditionMoney;
            private String couponCategory;

            private String accountId;
            private String area;


            private String exchangeTime;
            private String isExchange;
            private String value;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getCouponId() {
                return couponId;
            }

            public void setCouponId(String couponId) {
                this.couponId = couponId;
            }

            public String getCouponNo() {
                return couponNo;
            }

            public void setCouponNo(String couponNo) {
                this.couponNo = couponNo;
            }

            public String getCouponCode() {
                return couponCode;
            }

            public void setCouponCode(String couponCode) {
                this.couponCode = couponCode;
            }

            public String getCouponName() {
                return couponName;
            }

            public void setCouponName(String couponName) {
                this.couponName = couponName;
            }

            public String getExpirDate() {
                return expirDate;
            }

            public void setExpirDate(String expirDate) {
                this.expirDate = expirDate;
            }

            public String getTagOne() {
                return tagOne;
            }

            public void setTagOne(String tagOne) {
                this.tagOne = tagOne;
            }

            public String getTagTwo() {
                return tagTwo;
            }

            public void setTagTwo(String tagTwo) {
                this.tagTwo = tagTwo;
            }

            public int getLimitCount() {
                return limitCount;
            }

            public void setLimitCount(int limitCount) {
                this.limitCount = limitCount;
            }

            public String getSerId() {
                return serId;
            }

            public void setSerId(String serId) {
                this.serId = serId;
            }

            public int getCouponMoney() {
                return couponMoney;
            }

            public void setCouponMoney(int couponMoney) {
                this.couponMoney = couponMoney;
            }

            public String getCouponStatus() {
                return couponStatus;
            }

            public void setCouponStatus(String couponStatus) {
                this.couponStatus = couponStatus;
            }

            public int getConditionMoney() {
                return conditionMoney;
            }

            public void setConditionMoney(int conditionMoney) {
                this.conditionMoney = conditionMoney;
            }

            public String getCouponCategory() {
                return couponCategory;
            }

            public void setCouponCategory(String couponCategory) {
                this.couponCategory = couponCategory;
            }

            public String getAccountId() {
                return accountId;
            }

            public void setAccountId(String accountId) {
                this.accountId = accountId;
            }

            public String getArea() {
                return area;
            }

            public void setArea(String area) {
                this.area = area;
            }

            public String getExchangeTime() {
                return exchangeTime;
            }

            public void setExchangeTime(String exchangeTime) {
                this.exchangeTime = exchangeTime;
            }

            public String getIsExchange() {
                return isExchange;
            }

            public void setIsExchange(String isExchange) {
                this.isExchange = isExchange;
            }

            public String getValue() {
                return value;
            }

            public void setValue(String value) {
                this.value = value;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.couponId);
                dest.writeString(this.couponNo);
                dest.writeString(this.couponCode);
                dest.writeString(this.couponName);
                dest.writeString(this.expirDate);
                dest.writeString(this.tagOne);
                dest.writeString(this.tagTwo);
                dest.writeInt(this.limitCount);
                dest.writeString(this.serId);
                dest.writeInt(this.couponMoney);
                dest.writeString(this.couponStatus);
                dest.writeInt(this.conditionMoney);
                dest.writeString(this.couponCategory);
                dest.writeString(this.accountId);
                dest.writeString(this.area);
                dest.writeString(this.exchangeTime);
                dest.writeString(this.isExchange);
                dest.writeString(this.value);
            }

            public CouponListBean() {
            }

            protected CouponListBean(Parcel in) {
                this.id = in.readInt();
                this.couponId = in.readString();
                this.couponNo = in.readString();
                this.couponCode = in.readString();
                this.couponName = in.readString();
                this.expirDate = in.readString();
                this.tagOne = in.readString();
                this.tagTwo = in.readString();
                this.limitCount = in.readInt();
                this.serId = in.readString();
                this.couponMoney = in.readInt();
                this.couponStatus = in.readString();
                this.conditionMoney = in.readInt();
                this.couponCategory = in.readString();
                this.accountId = in.readString();
                this.area = in.readString();
                this.exchangeTime = in.readString();
                this.isExchange = in.readString();
                this.value = in.readString();
            }

            public static final Parcelable.Creator<CouponListBean> CREATOR = new Parcelable.Creator<CouponListBean>() {
                @Override
                public CouponListBean createFromParcel(Parcel source) {
                    return new CouponListBean(source);
                }

                @Override
                public CouponListBean[] newArray(int size) {
                    return new CouponListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.hasExchange);
            dest.writeString(this.appPic);
            dest.writeString(this.couponName);
            dest.writeString(this.backgroundPic);
            dest.writeString(this.rule);
            dest.writeInt(this.totalPrice);
            dest.writeTypedList(this.couponList);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.hasExchange = in.readString();
            this.appPic = in.readString();
            this.couponName = in.readString();
            this.backgroundPic = in.readString();
            this.rule = in.readString();
            this.totalPrice = in.readInt();
            this.couponList = in.createTypedArrayList(CouponListBean.CREATOR);
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeParcelable(this.data, flags);
        dest.writeString(this.message);
    }

    public RedPacketBean() {
    }

    protected RedPacketBean(Parcel in) {
        this.code = in.readString();
        this.data = in.readParcelable(DataBean.class.getClassLoader());
        this.message = in.readString();
    }

    public static final Parcelable.Creator<RedPacketBean> CREATOR = new Parcelable.Creator<RedPacketBean>() {
        @Override
        public RedPacketBean createFromParcel(Parcel source) {
            return new RedPacketBean(source);
        }

        @Override
        public RedPacketBean[] newArray(int size) {
            return new RedPacketBean[size];
        }
    };
}
